<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Global Body Planner: include/global_body_planner/rrt_connect.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Global Body Planner
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_94ddb28d1a8f6d812dff56d903a1ce15.html">global_body_planner</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">rrt_connect.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef RRTCONNECT_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define RRTCONNECT_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;global_body_planner/rrt.h&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// #include &quot;functions.h&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#define TRAPPED 0</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#define ADVANCED 1</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define REACHED 2</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceplanning__utils.html">planning_utils</a>;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classRRTConnectClass.html">   17</a></span>&#160;<span class="keyword">class </span><a class="code" href="classRRTConnectClass.html">RRTConnectClass</a> : <span class="keyword">public</span> <a class="code" href="classRRTClass.html">RRTClass</a></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <a class="code" href="classRRTConnectClass.html">RRTConnectClass</a>();</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    ~<a class="code" href="classRRTConnectClass.html">RRTConnectClass</a>();</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keywordtype">int</span> attemptConnect(State s_existing, State s, <span class="keywordtype">double</span> t_s, State &amp;s_new, Action &amp;a_new, <a class="code" href="classFastTerrainMap.html">FastTerrainMap</a>&amp; terrain, <span class="keywordtype">int</span> direction);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordtype">int</span> attemptConnect(State s_existing, State s, State &amp;s_new, Action &amp;a_new, <a class="code" href="classFastTerrainMap.html">FastTerrainMap</a>&amp; terrain, <span class="keywordtype">int</span> direction);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">int</span> connect(<a class="code" href="classPlannerClass.html">PlannerClass</a> &amp;T, State s, <a class="code" href="classFastTerrainMap.html">FastTerrainMap</a>&amp; terrain, <span class="keywordtype">int</span> direction);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    std::vector&lt;Action&gt; getActionSequenceReverse(<a class="code" href="classPlannerClass.html">PlannerClass</a> &amp;T, std::vector&lt;int&gt; path);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordtype">void</span> postProcessPath(std::vector&lt;State&gt; &amp;state_sequence, std::vector&lt;Action&gt; &amp;action_sequence, <a class="code" href="classFastTerrainMap.html">FastTerrainMap</a>&amp; terrain);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordtype">void</span> runRRTConnect(<a class="code" href="classPlannerClass.html">PlannerClass</a> &amp;Ta, <a class="code" href="classPlannerClass.html">PlannerClass</a> &amp;Tb, <a class="code" href="classFastTerrainMap.html">FastTerrainMap</a>&amp; terrain);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    </div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordtype">void</span> buildRRTConnect(<a class="code" href="classFastTerrainMap.html">FastTerrainMap</a>&amp; terrain, State s_start, State s_goal, std::vector&lt;State&gt; &amp;state_sequence, std::vector&lt;Action&gt; &amp;action_sequence, <span class="keywordtype">double</span> max_time);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="keyword">protected</span>:</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classRRTConnectClass.html#a9a0b075d5562560dcbdde72e00c733f0">  100</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classRRTConnectClass.html#a9a0b075d5562560dcbdde72e00c733f0">anytime_horizon</a>;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classRRTConnectClass.html#ade4e265ae025a586848fa5b87f452f07">  103</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">double</span> planning_rate_estimate = 16.0; <span class="comment">// m/s (meters planned/computation time)</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    </div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classRRTConnectClass.html#ac6a1c1aa7f49bf73b938b70a3d897371">  106</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="classRRTConnectClass.html#ac6a1c1aa7f49bf73b938b70a3d897371">anytime_horizon_init</a>;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classRRTConnectClass.html#a789206015b64495eddfdaf0ec457151d">  109</a></span>&#160;    <span class="keywordtype">double</span> horizon_expansion_factor = 1.2;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classRRTConnectClass.html#a001d087eeac2704c5cb25ee6355a29b6">  112</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> max_time_solve = 20;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;};</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="namespaceplanning__utils_html"><div class="ttname"><a href="namespaceplanning__utils.html">planning_utils</a></div><div class="ttdef"><b>Definition:</b> planning_utils.h:18</div></div>
<div class="ttc" id="classPlannerClass_html"><div class="ttname"><a href="classPlannerClass.html">PlannerClass</a></div><div class="ttdoc">A directed graph class with supplemental methods to aid in sample-based planning. ...</div><div class="ttdef"><b>Definition:</b> planner_class.h:13</div></div>
<div class="ttc" id="classFastTerrainMap_html"><div class="ttname"><a href="classFastTerrainMap.html">FastTerrainMap</a></div><div class="ttdoc">A terrain map class built for fast and efficient sampling. </div><div class="ttdef"><b>Definition:</b> fast_terrain_map.h:10</div></div>
<div class="ttc" id="classRRTClass_html"><div class="ttname"><a href="classRRTClass.html">RRTClass</a></div><div class="ttdoc">A class that implements RRT sampling-based planning. </div><div class="ttdef"><b>Definition:</b> rrt.h:18</div></div>
<div class="ttc" id="classRRTConnectClass_html_ac6a1c1aa7f49bf73b938b70a3d897371"><div class="ttname"><a href="classRRTConnectClass.html#ac6a1c1aa7f49bf73b938b70a3d897371">RRTConnectClass::anytime_horizon_init</a></div><div class="ttdeci">double anytime_horizon_init</div><div class="ttdoc">Initial anytime horizon (in seconds) </div><div class="ttdef"><b>Definition:</b> rrt_connect.h:106</div></div>
<div class="ttc" id="classRRTConnectClass_html"><div class="ttname"><a href="classRRTConnectClass.html">RRTConnectClass</a></div><div class="ttdoc">A class that implements RRT-Connect sampling-based planning. </div><div class="ttdef"><b>Definition:</b> rrt_connect.h:17</div></div>
<div class="ttc" id="classRRTConnectClass_html_a9a0b075d5562560dcbdde72e00c733f0"><div class="ttname"><a href="classRRTConnectClass.html#a9a0b075d5562560dcbdde72e00c733f0">RRTConnectClass::anytime_horizon</a></div><div class="ttdeci">double anytime_horizon</div><div class="ttdoc">Time horizon (in seconds) the planner is allowed to search until restarted. </div><div class="ttdef"><b>Definition:</b> rrt_connect.h:100</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
